package com.mlearning.demo.mapper;

import com.mlearning.demo.pojo.neo4j.Book;
import com.mlearning.demo.pojo.neo4j.Mastered;
import com.mlearning.demo.pojo.neo4j.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;

@Mapper
@Repository
public interface UserMapper {
    void add(@Param("name") String Name, @Param("password") String Password, @Param("email") String Email,
             @Param("registerTime") long registerTime,@Param("sign") String sign);
    int select_email(@Param("email") String Email);
    User select_one(@Param("email") String Email,@Param("password") String Password);
    void delete(@Param("name") String Name);
    ArrayList<String> getRecKnows(@Param("userid") int userId);
    ArrayList<Mastered>getMastered(@Param("userid") int userid);
//    ArrayList<String>getMastered(@Param("userid") int userid);
    int getMasteredQuan(@Param("userid") int userid);
    ArrayList<Book>getMyBooks(@Param("userid") int userid);
    int getMyBooksQuan(@Param("userid") int userid);
    int isMastered(@Param("userid") int userid,@Param("name") String knowName);
    int addMyBook(@Param("bookid") int bookId,@Param("userid") int userId,@Param("timestamp") long timestamp);
    int delMyBook(@Param("bookid") int bookId,@Param("userid") int userId);
    int editName(@Param("userid") int userid,@Param("content") String content);
    int editSign(@Param("userid") int userid,@Param("content") String content);
    int editEmail(@Param("userid") int userid,@Param("content") String content);
    int editPassword(@Param("userid") int userid,@Param("content") String content);
}
